package mk.jug.academy.service;

import java.util.List;

import mk.jug.academy.model.Comment;
import mk.jug.academy.model.Content;
import mk.jug.academy.model.Page;


/**
 * Defines the contract for the services regarding
 * the {@link Comment}s submitted to user {@link Content}s.
 *
 * @author Ice.Penov
 */
public interface CommentService {

	/**
	 * Gets the active {@link Comment}s for the given {@link Content}. 
	 */
	List<Comment> fetchCommentsForContent(Content content);

	/**
	 * Gets the active {@link Comment}s, in a paged manner.
	 */
	Page<Comment> listActive(int pageNumber, int itemsPerPage);
	
	/**
	 * Gets the deleted {@link Comment}s, in a paged manner.
	 */
	Page<Comment> listDeleted(int pageNumber, int itemsPerPage);
	
	/**
	 * Adds a {@link Comment} to the given {@link Content}.
	 */
	void add(Comment comment, Content content);
	
	/**
	 * Deletes (soft) a {@link Comment}.
	 */
	void delete(Comment comment);


}